import BigNumber from "bignumber.js";
import Icon1Inch from "@/assets/aggregator/1inch.svg";
import IconCow from "@/assets/aggregator/cow.svg";
import IconKyber from "@/assets/aggregator/kyber.svg";
import IconMatcha from "@/assets/aggregator/matcha.svg";
import IconParaswap from "@/assets/aggregator/paraswap.svg";

export const maxAmount = BigNumber(
  "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
).toFixed(0, 1);

export const nativeToken = ["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "0x0000000000000000000000000000000000000000"];

export const isNativeToken = (address)=>{
  return address && nativeToken.indexOf(address.toLowerCase()) >= 0;
}

export const ProxyContractMap = {
  "bsc": "0x69D135d5cCAb48895BF8b26B1162d7c3befd54A0"
}

export const getProxyContract = (chain) => {
  return ProxyContractMap[chain] || "0x69D135d5cCAb48895BF8b26B1162d7c3befd54A0";
}

export const AGGREGATOR = {
  OpenOcean: "OpenOceanV2",
  OneInch: "OneInchV4",
}

export const Aggregators = [
  {
    code: "1inch",
    name: "1inch",
    icon: Icon1Inch,
    disabled: false,
  },
  {
    code: "cow",
    name: "CowSwap",
    icon: IconCow,
    disabled: false,
  },
  {
    code: "kyber",
    name: "KyberSwap",
    icon: IconKyber,
    disabled: false,
  },
  {
    code: "matcha",
    name: "Matcha",
    icon: IconMatcha,
    disabled: false,
  },
  {
    code: "paraswap",
    name: "Paraswap",
    icon: IconParaswap,
    disabled: false,
  },
];
